﻿<Window x:Class="ScrumTable.UI.View.WinTouch.AppScreen"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:Microsoft.Surface.Presentation.Controls;assembly=Microsoft.Surface.Presentation" xmlns:UserControls="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls" xmlns:Converter="clr-namespace:ScrumTable.UI.View.Converter;assembly=ScrumTable.UI.View" xmlns:Tool="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls.Tool" xmlns:Tools="clr-namespace:ScrumTable.UI.ViewModel.Tools;assembly=ScrumTable.UI.ViewModel"
        xmlns:Toast="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls.Tool.Toast"
        xmlns:System="clr-namespace:System;assembly=mscorlib" Title="ScrumTable" WindowStyle="None" ResizeMode="NoResize"
         UIElement.KeyUp="OnPreviewKeyDown" Stylus.IsFlicksEnabled="False">
    
    <Grid>        
        <Grid.Resources>
            <Converter:ConverterBoolVisibility x:Key="ConverterBoolVisibility" />            
            <Converter:ConverterIsNullVisibility   IsEmpty="True"  x:Key="IsNullConverter"/>
        </Grid.Resources>        
        <Grid Name="BackGrid" Panel.ZIndex="0" >
        </Grid>        
        <Grid Name="BackMultiMonitorGrid" Panel.ZIndex="1"  >
        </Grid>      
        <Grid  Name="ScatteredItemGrid" Panel.ZIndex="2">            
            <s:ScatterView Name="ItemView"/>            
        </Grid>
        <Grid Name="FrontGrid" Panel.ZIndex="3">
        </Grid>
    
        <Grid Name="ToolGrid" Panel.ZIndex="4" >

            <Label VerticalAlignment="Center" HorizontalAlignment="Right" Opacity="0.5" IsHitTestVisible="False"  AllowDrop="False" Visibility="{Binding ScrumData.Filter, Converter={StaticResource IsNullConverter}}">
                <Label.Content>
                    <StackPanel Orientation="Horizontal">
                        <Canvas Background="{StaticResource IconFilterState}" Width="40" Height="40" VerticalAlignment="Center"/>
                        <TextBlock Text="{Binding ScrumData.Filter, Mode=OneWay}"  FontSize="30"  Foreground="Red"/>
                    </StackPanel>
                </Label.Content>
                <Label.LayoutTransform>
                    <RotateTransform Angle="90"/>
                </Label.LayoutTransform>
            </Label>

            <Label VerticalAlignment="Center" HorizontalAlignment="Left" Opacity="0.5" IsHitTestVisible="False"  AllowDrop="False" Visibility="{Binding ScrumData.Filter, Converter={StaticResource IsNullConverter}}">
                <Label.Content>
                    <StackPanel Orientation="Horizontal">
                        <Canvas Background="{StaticResource IconFilterState}" Width="40" Height="40" VerticalAlignment="Center"/>
                        <TextBlock Text="{Binding ScrumData.Filter, Mode=OneWay}"  FontSize="30"  Foreground="Red"/>
                    </StackPanel>
                </Label.Content>
                <Label.LayoutTransform>
                    <RotateTransform Angle="90"/>
                </Label.LayoutTransform>
            </Label>

            <s:SurfaceButton Width="40" Height="40" HorizontalAlignment="Left"  VerticalAlignment="Bottom" Style="{StaticResource ToolButtonLeft}" Background="{StaticResource IconScrumTableStartButtonLeft}" Click="OnToolButtonClick" Visibility="{Binding Path=ScrumData.IsUserConnected, Converter={StaticResource ConverterBoolVisibility}}"/>
            <s:SurfaceButton Width="40" Height="40" HorizontalAlignment="Right"  VerticalAlignment="Bottom" Style="{StaticResource ToolButtonRight}" Background="{StaticResource IconScrumTableStartButtonRight}" Click="OnToolButtonClick" Visibility="{Binding Path=ScrumData.IsUserConnected, Converter={StaticResource ConverterBoolVisibility}}"/>
                
            <UserControls:LoadScreen Visibility="Hidden" VerticalAlignment="Center"  HorizontalAlignment="Center" x:Name="PleaseWait"/>
            <ContentControl  HorizontalAlignment="Right"  VerticalAlignment="Stretch" x:Name="ErrorPlaceHolder" IsTabStop="False" Margin="0,50, 0 ,50" >
                <Toast:ToastPublisherControl UserControls:ScrumUserControl.BuildUpElement="True"/>
            </ContentControl>
        </Grid>
      
    </Grid>
</Window>
